package com.yh.patterns.factory.abstract_factory;

/**
 * @Auther:云尚学Java
 */
public class Client {
    public static void main(String[] args) {
        //创建的是意大利风味甜点工厂对象
        //ItalyDessertFactory factory=new ItalyDessertFactory();
        AmericanDessertFactory factory=new AmericanDessertFactory();
        //获取拿铁咖啡和提拉米苏甜品
        Coffee coffee = factory.createCoffee();
        Dessert dessert = factory.createDessert();
        System.out.println(coffee.getName());
        dessert.show();

    }
}
